package com.uchedao.seller.module;

import android.text.TextUtils;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

/**
 * 配置信息
 * 
 * @author "叶晋"
 * 
 */
public class ConfigInfo implements Cloneable {

	@Expose
	@SerializedName("vin")
	public String vin;// vin码

	@Expose
	@SerializedName("electrically_seat")
	public String electrically_seat;// 电动座椅

	@Expose
	@SerializedName("reverse_view")
	public String reverse_view;// 倒车影像

	@Expose
	@SerializedName("air")
	public String air;// 空调

	@Expose
	@SerializedName("rear_tire_size")
	public String rear_tire_size;// 后轮胎规格

	@Expose
	@SerializedName("tool")
	public String tool;// 随车工具

	@Expose
	@SerializedName("variable_suspension")
	public String variable_suspension;// 可变悬架

	@Expose
	@SerializedName("leather_seats")
	public String leather_seats;// 真皮座椅

	@Expose
	@SerializedName("front_tire_size")
	public String front_tire_size;// 前轮胎规格

	@Expose
	@SerializedName("hub_material")
	public String hub_material;// 轮毂材质

	@Expose
	@SerializedName("centre_console_lcd")
	public String centre_console_lcd;// 中控液晶屏

	@Expose
	@SerializedName("smart_key")
	public String smart_key;// 智能钥匙

	@Expose
	@SerializedName("window")
	public String window;// 天窗

	@Expose
	@SerializedName("auto_adapt_drive")
	public String auto_adapt_drive;// 定速巡航

	@Expose
	@SerializedName("spare_tire")
	public String spare_tire;// 备胎

	@Expose
	@SerializedName("abs")
	public String abs;// ABS

	@Expose
	@SerializedName("electrically_window")
	public String electrically_window;// 电动门窗

	@Expose
	@SerializedName("back_mirror_electrically")
	public String back_mirror_electrically;// 电动反光镜

	@Expose
	@SerializedName("dvd")
	public String dvd;// DVD

	@Expose
	@SerializedName("airbag")
	public String airbag;// 气囊数

	@Expose
	@SerializedName("sound_system")
	public String sound_system;// 音响

	@Expose
	@SerializedName("park_help")
	public String park_help;// 倒车雷达

	@Expose
	@SerializedName("gps_navigator")
	public String gps_navigator;// 导航

	@Expose
	@SerializedName("booster_type")
	public String booster_type;// 转向助力

	@Expose
	@SerializedName("car_engines")
	public String car_engines;// 排量(new)

	@Expose
	@SerializedName("trans_type_key")
	public String trans_type_key;// 变速箱(new)

	@Expose
	@SerializedName("trans_type")
	public String trans_type;// 变速箱(new)

	@SerializedName("brand_code")
	public int brand_id = -1;// 品牌(new)

	@Expose
	@SerializedName("brand_id")
	public String brand_str;// 品牌名称(new)

	@SerializedName("series_code")
	public int series_id = -1;// 车系(new)

	@Expose
	@SerializedName("series_id")
	public String series_str;// 车系(new)

	@SerializedName("model_code")
	public int model_id = -1;// 车型(new)

	@Expose
	@SerializedName("model_id")
	public String model_str;// 车型(new)

	@Expose
	@SerializedName("retro_items")
	public String retro_items;// 加装项目

	@Override
	public ConfigInfo clone() throws CloneNotSupportedException {
		return (ConfigInfo) super.clone();
	}

	/**
	 * 信息完成状态  0未开始，1进行中，2已完成
	 */
	public int getStatus() {
		String[] datas = {vin, electrically_seat, reverse_view, air, rear_tire_size, tool, variable_suspension, leather_seats,
			front_tire_size, hub_material, centre_console_lcd, smart_key, window, auto_adapt_drive, spare_tire, abs,
			electrically_window, back_mirror_electrically, dvd, airbag, sound_system, park_help, gps_navigator, booster_type,
			car_engines, trans_type, brand_str, series_str, model_str};
		for(int i=0; i<datas.length; i++)
			if(TextUtils.isEmpty(datas[i]))
				return 1;
		return 2;
	}
}
